#include<bits/stdc++.h>
using namespace std;
struct Fraction {
	int numerator;
	int denominator;
};

void print(const Fraction &f) {
	printf("%d/%d", f.numerator, f.denominator);
}
void rationalize(Fraction &f) {
	int g = __gcd(f.numerator, f.denominator);
	f.denominator /= g;
	f.numerator /= g;
}
void input(Fraction &f) {
	scanf("%d%d", &f.numerator, &f.denominator);
	rationalize(f);
}
Fraction add(Fraction &a, Fraction&b) {
	Fraction c;
	//TODO
	c.numerator = a.numerator * b.denominator + b.numerator * a.denominator;
	c.denominator = a.denominator * b.denominator;
	rationalize(c);
	return c;
}
int main() {
	Fraction f, g ;

	input(f);
	input(g);
	Fraction c = add(f, g);

	print(c);

}
